/* 禁止页面滚动 */
body, html {
  overflow: hidden;
  height: 100%;
  margin: 0;
  padding: 0;
}

.index-container {
  height: 100vh;
  width: 100vw;
  background: #f5f5f5;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

/* 数字人主容器 */
.digital-human-container {
  text-align: center;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0;
  overflow: hidden;
}

/* 数字人形象区域 */
.digital-human-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60rpx;
  margin: 0;
  flex: 1;
  justify-content: flex-start;
  padding-top: 10vh;
}

.digital-human-avatar {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.avatar-circle {
  width: 300rpx;
  height: 300rpx;
  background: #ffa500;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8rpx 30rpx rgba(255, 165, 0, 0.3);
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.avatar-circle.happy {
  animation: happy-bounce 2s infinite;
}

.avatar-circle.idle {
  animation: idle-float 4s infinite ease-in-out;
}

.avatar-circle.listening {
  animation: listening-pulse 1s infinite;
}

.avatar-circle.thinking {
  animation: thinking-rotate 3s infinite linear;
}

.avatar-expression {
  font-size: 160rpx;
  filter: drop-shadow(0 4rpx 8rpx rgba(0, 0, 0, 0.2));
}

.avatar-glow {
  position: absolute;
  top: -30rpx;
  left: -30rpx;
  right: -30rpx;
  bottom: -30rpx;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 1;
  animation: glow-pulse 3s infinite ease-in-out;
  pointer-events: none;
}

.digital-human-info {
  text-align: center;
}

.recognized-text {
  font-size: 28rpx;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  padding: 16rpx 24rpx;
  border-radius: 20rpx;
  backdrop-filter: blur(10rpx);
  border: 1px solid rgba(255, 255, 255, 0.3);
  max-width: 80%;
  text-align: center;
  word-break: break-word;
  margin-top: 20rpx;
}

.permission-warning {
  font-size: 24rpx;
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.1);
  padding: 12rpx 20rpx;
  border-radius: 16rpx;
  border: 1px solid rgba(255, 107, 107, 0.3);
  margin-top: 16rpx;
  animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.recording-status {
  font-size: 32rpx;
  color: #00ff88;
  background: rgba(0, 255, 136, 0.2);
  padding: 16rpx 24rpx;
  border-radius: 20rpx;
  border: 2px solid rgba(0, 255, 136, 0.5);
  margin-top: 20rpx;
  animation: pulse-recording 1s infinite;
  font-weight: bold;
  text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.5);
}

.record-complete {
  font-size: 32rpx;
  color: #00aaff;
  background: rgba(0, 170, 255, 0.2);
  padding: 16rpx 24rpx;
  border-radius: 20rpx;
  border: 2px solid rgba(0, 170, 255, 0.5);
  margin-top: 20rpx;
  font-weight: bold;
  text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.5);
}

.processing-status {
  font-size: 32rpx;
  color: #ffaa00;
  background: rgba(255, 170, 0, 0.2);
  padding: 16rpx 24rpx;
  border-radius: 20rpx;
  border: 2px solid rgba(255, 170, 0, 0.5);
  margin-top: 20rpx;
  font-weight: bold;
  text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.5);
  animation: processing-pulse 1.5s infinite;
}

@keyframes processing-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.debug-status {
  font-size: 20rpx;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.3);
  padding: 8rpx 16rpx;
  border-radius: 12rpx;
  margin-top: 16rpx;
  font-family: monospace;
}

@keyframes pulse-recording {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

.recording-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16rpx;
  margin-top: 20rpx;
}

.recording-dots {
  display: flex;
  gap: 8rpx;
}

.dot {
  width: 16rpx;
  height: 16rpx;
  border-radius: 50%;
  background: #00ff88;
  animation: dot-pulse 1.4s infinite ease-in-out;
}

.dot:nth-child(1) { animation-delay: 0s; }
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot-pulse {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

.digital-human-name {
  font-size: 84rpx;
  font-weight: bold;
  color: #333;
  display: block;
  margin-bottom: 30rpx;
  text-shadow: none;
}

.digital-human-status {
  font-size: 56rpx;
  color: #666;
  display: block;
  transition: all 0.3s ease;
  text-shadow: none;
}

/* 语音按钮 */
.voice-button-container {
  position: absolute;
  bottom: 15vh;
  left: 30rpx;
  z-index: 100;
}

.voice-button {
  width: 100rpx;
  height: 100rpx;
  border-radius: 50%;
  background: #ff6b35;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4rpx 15rpx rgba(255, 107, 53, 0.3);
  transition: all 0.3s ease;
}

.voice-button.recording {
  background: linear-gradient(135deg, #ff4757 0%, #c44569 100%);
  animation: recording-pulse 1s infinite;
  transform: scale(1.1);
}

.voice-button:active {
  transform: scale(0.95);
}

.voice-icon {
  font-size: 48rpx;
  color: white;
}

@keyframes recording-pulse {
  0% {
    box-shadow: 0 8rpx 24rpx rgba(255, 71, 87, 0.3);
  }
  50% {
    box-shadow: 0 8rpx 40rpx rgba(255, 71, 87, 0.6);
  }
  100% {
    box-shadow: 0 8rpx 24rpx rgba(255, 71, 87, 0.3);
  }
}

/* 文本输入容器 */
.text-input-container {
  position: absolute;
  bottom: 15vh;
  left: 150rpx;
  right: 30rpx;
  margin: 0;
  display: flex;
  gap: 20rpx;
  align-items: center;
  z-index: 100;
}

.text-input {
  flex: 1;
  background: white;
  border: none;
  border-radius: 50rpx;
  padding: 20rpx 30rpx;
  font-size: 32rpx;
  box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.1);
}

.send-button {
  background: #007aff;
  color: white;
  border: none;
  border-radius: 50rpx;
  padding: 20rpx 40rpx;
  font-size: 32rpx;
  font-weight: bold;
  box-shadow: 0 4rpx 15rpx rgba(0, 122, 255, 0.2);
  transition: all 0.3s ease;
}

.send-button:active {
  transform: scale(0.95);
  box-shadow: 0 4rpx 16rpx rgba(0, 122, 255, 0.4);
}

.send-button:disabled {
  background: #ccc;
  box-shadow: none;
  transform: none;
}



/* 录音弹出层 */
.recording-modal {
  position: fixed;
  top: 100px;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  position: absolute;
  bottom: 50%;
  left: 0;
  right: 0;
  margin: 0 auto;
  transform: translateY(50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 50rpx 70rpx;
  border-radius: 50rpx;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 560rpx;
  max-width: 560rpx;
  z-index: 1001;
}

.recording-animation {
  display: flex;
  gap: 8rpx;
  margin-bottom: 16rpx;
}

/* 保留这个动画定义 */
@keyframes wave {
  0%, 40%, 100% {
    transform: scaleY(0.4);
  }
  20% {
    transform: scaleY(1);
  }
}

/* 统一使用 wave 动画 */
.wave {
  width: 8rpx;
  height: 40rpx;
  background: #007aff;
  border-radius: 4rpx;
  animation: wave 1.2s infinite ease-in-out;
}

.wave:nth-child(2) {
  animation-delay: 0.1s;
}

.wave:nth-child(3) {
  animation-delay: 0.2s;
}

.recording-text {
  font-size: 32rpx;
  margin-bottom: 36rpx;
  text-align: center;
}

.modal-buttons {
  display: flex;
  gap: 60rpx;
  align-items: center;
}

.modal-btn {
  width: 120rpx;
  height: 120rpx;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.text-btn {
  background: #007aff;
  box-shadow: 0 8rpx 24rpx rgba(0, 122, 255, 0.3);
}

.text-btn:active {
  transform: scale(0.95);
  box-shadow: 0 4rpx 16rpx rgba(0, 122, 255, 0.4);
}

.text-btn.selected {
  transform: scale(1.1);
  box-shadow: 0 12rpx 30rpx rgba(0, 122, 255, 0.6);
  border: 4rpx solid #ffffff;
}

.exit-btn {
  background: #ff3b30;
  box-shadow: 0 8rpx 24rpx rgba(255, 59, 48, 0.3);
}

.exit-btn:active {
  transform: scale(0.95);
  box-shadow: 0 4rpx 16rpx rgba(255, 59, 48, 0.4);
}

.exit-btn.selected {
  transform: scale(1.1);
  box-shadow: 0 12rpx 30rpx rgba(255, 59, 48, 0.6);
  border: 4rpx solid #ffffff;
}

.btn-icon {
  color: white;
  font-size: 48rpx;
  font-weight: bold;
}











/* 数字人动画效果 */
@keyframes happy-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-15px) scale(1.05); }
}

@keyframes idle-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes listening-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes thinking-rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.1); }
}

/* 波形条动画样式 */
.voice-wave-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20rpx;
  margin-top: 40rpx;
  animation: fade-in 0.3s ease-in-out;
}

.wave-bars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6rpx;
  height: 80rpx;
}

.wave-bar {
  width: 8rpx;
  background: linear-gradient(135deg, #007aff 0%, #00d4ff 100%);
  border-radius: 4rpx;
  animation: wave-bar-pulse 1.2s infinite ease-in-out;
  min-height: 20rpx;
}

.wave-bar.bar-1 { animation-delay: 0s; }
.wave-bar.bar-2 { animation-delay: 0.1s; }
.wave-bar.bar-3 { animation-delay: 0.2s; }
.wave-bar.bar-4 { animation-delay: 0.3s; }
.wave-bar.bar-5 { animation-delay: 0.2s; }
.wave-bar.bar-6 { animation-delay: 0.1s; }
.wave-bar.bar-7 { animation-delay: 0s; }

@keyframes wave-bar-pulse {
  0%, 100% {
    height: 20rpx;
    opacity: 0.6;
  }
  50% {
    height: 80rpx;
    opacity: 1;
  }
}

@keyframes fade-in {
  0% {
    opacity: 0;
    transform: translateY(10rpx);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.wave-text {
  font-size: 28rpx;
  color: #007aff;
  font-weight: 500;
  text-shadow: 0 2rpx 4rpx rgba(0, 122, 255, 0.2);
  animation: text-pulse 2s infinite ease-in-out;
}

@keyframes text-pulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

/* H5端现代简洁首页样式 */
.h5-home-container {
  min-height: 100vh;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 40px;
  color: #1a202c;
}

.h5-header {
  text-align: center;
  margin-bottom: 80px;
}

.h5-title {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 20px;
  display: block;
  color: #2d3748;
  letter-spacing: -0.025em;
}

.h5-subtitle {
  font-size: 20px;
  color: #718096;
  display: block;
  font-weight: 400;
}

.h5-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  width: 100%;
  max-width: 1200px;
  margin-bottom: 80px;
}

.h5-feature-item {
  background: white;
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.h5-feature-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  border-color: #cbd5e0;
}

.h5-feature-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 16px;
  color: #4299e1;
}

.h5-feature-text {
  font-size: 18px;
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
  color: #2d3748;
}

.h5-feature-desc {
  font-size: 14px;
  color: #718096;
  display: block;
  line-height: 1.4;
}

.h5-footer {
  text-align: center;
  margin-top: auto;
}

.h5-footer-text {
  font-size: 14px;
  color: #a0aec0;
  display: block;
}

.h5-nav-button {
  padding: 12px 20px;
  margin: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
  min-width: 100px;
}

.h5-nav-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.h5-nav-button:active {
  transform: translateY(0);
}

.h5-nav-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.h5-3d-button {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.h5-3d-button:hover {
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .h5-home-container {
    padding: 40px 20px;
  }
  
  .h5-title {
    font-size: 32px;
    margin-bottom: 12px;
  }
  
  .h5-subtitle {
    font-size: 16px;
  }
  
  .h5-header {
    margin-bottom: 60px;
  }
  
  .h5-features {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 100%;
    margin-bottom: 60px;
  }
  
  .h5-feature-item {
    padding: 24px 16px;
    min-height: 140px;
    border-radius: 12px;
  }
  
  .h5-feature-icon {
    font-size: 32px;
    margin-bottom: 12px;
  }
  
  .h5-feature-text {
    font-size: 16px;
    margin-bottom: 6px;
  }
  
  .h5-feature-desc {
    font-size: 13px;
  }
  
  .h5-footer-text {
    font-size: 13px;
  }
}

/* 响应式设计 - 小屏设备优化 */
@media (max-width: 750rpx) {
  .digital-human-container {
    padding: 0;
  }
  
  .avatar-circle {
    width: 240rpx;
    height: 240rpx;
  }
  
  .avatar-expression {
    font-size: 120rpx;
  }
  
  .digital-human-name {
    font-size: 72rpx;
  }
  
  .digital-human-status {
    font-size: 28rpx;
    color: #666;
    margin-top: 8rpx;
    text-align: center;
  }
  
  .voice-button-container {
    bottom: 12vh;
    left: 30rpx;
  }
  
  .text-input-container {
    bottom: 12vh;
    left: 150rpx;
    right: 30rpx;
    margin: 0;
  }
  
  .text-input {
    padding: 16rpx 24rpx;
    font-size: 28rpx;
  }
  
  .send-button {
    padding: 16rpx 32rpx;
    font-size: 28rpx;
  }
  
  .modal-content {
    min-width: 480rpx;
    padding: 40rpx 60rpx;
  }
  
  .modal-btn {
    width: 100rpx;
    height: 100rpx;
  }
  
  .btn-icon {
    font-size: 40rpx;
  }
  
  .recording-text {
    font-size: 28rpx;
  }
  
  /* 波形条动画响应式优化 */
  .voice-wave-container {
    margin-top: 30rpx;
    gap: 16rpx;
  }
  
  .wave-bars {
    height: 60rpx;
    gap: 4rpx;
  }
  
  .wave-bar {
    width: 6rpx;
  }
  
  @keyframes wave-bar-pulse {
    0%, 100% {
      height: 16rpx;
      opacity: 0.6;
    }
    50% {
      height: 60rpx;
      opacity: 1;
    }
  }
  
  .wave-text {
    font-size: 24rpx;
  }
}